#include "../core/Log.h"
//
// Created by Administrator on 2021/10/21.
//

class F {
public:
    int x,y;
    F() {
        x = y = 0;
        log_info("F constructor!");
    };
    F(int a) {
        log_info("F constructor! ... %d", a);
    };
    ~F() {
        log_info("~F constructor!");
    };
public:
    static F * createInstance() {
        F * f = new F();
        return f;
    };
    void m() {
        log_info("%p->F.m()! x=%d, y=%d", this, this->x, this->y);
    };

    void replease() {
        //SAFE_DELETE(this);
    }
};

class S1 : public F{
public:
    S1(){
        log_info("S1 constructor!");
    };
    S1(int a) : F(a){
        log_info("S1 constructor! ... %d", a);
    }
    ~S1() {
        log_info("~S1 constructor!%p", this);
    };
};